import tkinter
from tkinter import ttk

class Deng():
    def __init__(self):
        self.root = tkinter.Tk()
        self.root.minsize(500,500)
        self.root.geometry("500x500+100+100")
        self.add_layout()


    def add_layout(self):
        style = ttk.Style()
        # style.configure('bg.TFrame', background='black')
        frame = ttk.Frame(self.root, padding=5)
        frame.grid(column=0, row=0)
        self.root.rowconfigure(0, weight=1)
        self.root.columnconfigure(0, weight=1)

        # 输入框
        self.input_str = tkinter.StringVar()
        entry_input = ttk.Entry(frame, textvariable=self.input_str)
        entry_input.grid(row=0, column=0, sticky=(tkinter.W, tkinter.E))
        # 输入框
        self.result_str = tkinter.StringVar()
        entry_result = ttk.Entry(frame, textvariable=self.result_str)
        entry_result.grid(row=1, column=0,  sticky=(tkinter.W, tkinter.E))

        bottom_frame = ttk.Frame(frame, padding=(0, 10))
        bottom_frame.grid(row=2, column=0)
        # C % / 一行

        btn_c = ttk.Button(bottom_frame, text='C')
        btn_c.grid(row=0, column=0)
        btn_re = ttk.Button(bottom_frame, text='%')
        btn_re.grid(row=0, column=2)
        btn_a = ttk.Button(bottom_frame, text='/')
        btn_a.grid(row=0, column=3)






    def run(self):
        self.root.mainloop()

d = Deng()
d.run()
